package com.technoorbit.vbreakup;


import java.util.Timer;
import java.util.TimerTask;


import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.os.Bundle;

public class SplashActivity extends Activity 
{
	private long splashDelay = 1500;
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splash);
		TimerTask task = new TimerTask() {
			@Override
			public void run() {
				
				finish();
				Intent socialConnectIntent = new Intent().setClass(SplashActivity.this, SupermainActivity.class);
				startActivity(socialConnectIntent);
				
	    	}
		};
		
		Timer timer = new Timer();
		timer.schedule(task, splashDelay);
	}
	//Check weather Internet connection is available or not
    public boolean checkInternetConnection() {
               final ConnectivityManager conMgr = (ConnectivityManager) getSystemService (Context.CONNECTIVITY_SERVICE);
               if (conMgr.getActiveNetworkInfo() != null && conMgr.getActiveNetworkInfo().isAvailable() &&    conMgr.getActiveNetworkInfo().isConnected()) {
                     return true;
               } else {
                     
                   return false;
               }
            }
}

